import weaviate
from weaviate.classes.query import Filter, GeoCoordinate, MetadataQuery, QueryReference  # Import classes as needed
import os

#client = weaviate.connect_to_local()

client = weaviate.Client("http://192.168.98.128:8080")  # 默认情况下，Weaviate 在 8080 端口运行

collection = client.collections.get("Article")
response = collection.query.fetch_objects(
    filters=Filter.by_property("wordCount").greater_than(1000),
    limit=5
)

for o in response.objects:
    print(o.properties)  # Inspect returned objects
client.close()